package com.litesuits.sdk.listener;

import android.support.v4.app.Fragment;
import com.litesuits.http.listener.HttpListener;

public abstract class AbsFragmentHttpListener<T> extends HttpListener<T> {
    protected Fragment fragment;

    public AbsFragmentHttpListener(Fragment fragment) {
        this.fragment = fragment;
    }

    @Override
    public boolean disableListener() {
        return fragment == null || !fragment.isAdded();
    }
}